package com.bonuo.crm.service.impl;

import com.bonuo.crm.domain.Province;
import com.bonuo.crm.domain.WarZone;
import com.bonuo.crm.mapper.ProvinceMapper;
import com.bonuo.crm.mapper.WarZoneMapper;
import com.bonuo.crm.service.WarZoneService;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class WarZoneServiceImpl implements WarZoneService {
    @Autowired
    private WarZoneMapper warZoneMapper;

    @Override
    public List<WarZone> list(WarZone warZone) {
        return warZoneMapper.list(warZone);
    }

    @Override
    public Integer add(WarZone warZone) {
        //先添加战区
        Integer add = warZoneMapper.add(warZone);
        return add;
    }

    @Override
    public Integer update(WarZone warZone) {
        return warZoneMapper.update(warZone);
    }

    @Override
    public Integer delete(Integer id) {
        Integer delete = warZoneMapper.delete(id);
        return delete;
    }
}
